<?php
if($_COOKIE[user_id]){
     $per_rs=@mysql_query("select * from member where id='".$_COOKIE['user_id']."'");
	 $per_row=@mysql_fetch_array($per_rs);
	 if($per_row[m_mode]==1){
		echo "<script>location='/member/'</script>";
	 }
}else{
    echo "<script>location='/login';</script>";
}
?>